<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>New Document</TITLE>
<meta http-equiv="Cotent-Type" content="text/html; charset=utf-8">
<link rel="STYLESHEET" type="text/css" href="../../../widget/beautystyle/beautystyle.css">
<link rel="STYLESHEET" type="text/css" href="../../../widget/tree/tctree/tctree.css">
<link rel="STYLESHEET" type="text/css" href="popup.css">
<script type="text/javascript" src="../../../js/jquery.js"></script>
<script type="text/javascript" src="../../../js/TC.js"></script>
<script type="text/javascript" src="popup.js"></script>
<script type="text/javascript" src="../../../widget/tree/tctree/tctree.js"></script>
<style type="text/css">
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td
	{
	margin: 0px;
	padding: 0px;
	font-family: "Arial Unicode MS", Arial, sans-serif;
	font-size: 12px;
}

body {
	color: black;
	margin: 0px;
	border: 0px;
	padding: 0px;
	background: #fff;
	direction: ltr;
}
</style>
</HEAD>

<BODY>
<textarea rows="5" cols="80" id="test"></textarea>
<textarea rows="2" cols="80" id="test1"></textarea>
sss
<div class="tree" style="width: 300px; height: 800px; overflow: auto; position: relative;">
<div class="treeRow"><span class="treeNode"><span class="treeIndent"></span><span
	class="nodeText">ROOT</span></span>
<div class="subTree">
<div class="treeRow"><span class="treeNode"><span class="treeIndent"></span><span
	class="icon_T">&nbsp;&nbsp;</span><span class="nodeText">tree1</span></span>
<div class="subTree">
<div class="treeRow"><span class="treeNode"><span class="treeIndent"><span
	class="icon_I">&nbsp;&nbsp;</span></span><span class="icon_T">&nbsp;&nbsp;</span><span class="nodeText">tree11</span></span>
<div class="subTree">
<div class="treeRow"><span class="treeNode"><span class="treeIndent"><span
	class="icon_I">&nbsp;&nbsp;</span><span class="icon_I">&nbsp;&nbsp;</span></span><span class="icon_L">&nbsp;&nbsp;</span><span
	class="nodeText">tree111</span></span>
<div class="subTree"></div>
</div>
</div>
</div>
<div class="treeRow"><span class="treeNode"><span class="treeIndent"><span
	class="icon_I">&nbsp;&nbsp;</span></span><span class="icon_L">&nbsp;&nbsp;</span><span class="nodeText">tree12</span></span>
<div class="subTree"></div>
</div>
</div>
</div>
<div class="treeRow"><span class="treeNode"><span class="treeIndent"><span
	class="icon_L">&nbsp;&nbsp;</span></span><span class="nodeText">tree2</span></span>
<div class="subTree"></div>
</div>
</div>
</div>
</div>
sss
</BODY>
<script type="text/javascript">
$(document).ready(function(){
	try{
	var menu={items:[{text:'中文111'},{text:'中文222'},{text:'中文222'},{text:'中文222'}],callback:function(data){alert(data.text);}};
	var testcasetree = new $.Tree({treeNode:$('.tree'),treeData:genTree(),checkable:true,contextMenu:menu});
	testcasetree.show();
	}catch(err){alert(err)}
});
function genTree(id,level){
	var tree=[];
	id=id||'';
	var me = arguments.callee;
	if(level==undefined){
		level=Math.floor(Math.random()*6)*0+3;//5
	}else if(level==0){
		return [];
	}
	var nodes=Math.floor(Math.random()*5)*0+3;//3
	for(var i=0;i<nodes;i++){
		var tmp=id.concat(i,'中文');
		tree.push({id:tmp,text:tmp,exppand:true,children:me(tmp,level-1)});
	}
	return tree;
}
</script>
</HTML>
